package com.aabte.spring.thirdimport;

import com.example.beans.Blue;
import com.example.beans.Color;
import com.example.beans.Yellow;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author Daniel
 */
public class MyImportSelector implements ImportSelector {
    /**
     * 此方法返回需要导入的类的全类名数组
     * @param importingClassMetadata 当前标注@Import注解的类的所有注解信息
     */
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[]{
                Color.class.getName(),
                Blue.class.getName(),
                Yellow.class.getName()
        };
    }
}
